<?php
class User_Model_Basicinfo{
	protected $userid;
	protected $phone;
	protected $age;
	protected $nation;
	protected $height;
	protected $weight;
	protected $sight_before;
	protected $sight_after;
	protected $household;
	protected $location;
	protected $marriage;
	protected $educational;
	protected $is_driver;
	protected $driver_age;
	protected $lisence;
	protected $car_type;
	protected $car_number;
	protected $smoke_drive;
	protected $drive_miles;
	protected $drive_area;
	protected $light;
	protected $normal;
	protected $heavy;
	protected $danger;
	protected $alcohol;
	protected $eight;
	protected $four;
	protected $exhaust;
	protected $is_complished;
	
	
	public function __construct(array $options = null)
	{
		if (is_array($options)) {
			$this->setOptions($options);
		}
	}
	
	public function setOptions(array $options)
	{
		$methods = get_class_methods($this);
		foreach ($options as $key => $value) {
			$method = 'set' . ucfirst($key);
			if (in_array($method, $methods)) {
				$this->$method($value);
			}
		}
		return $this;
	}
	
	public function toJson(){
		return json_encode($this->toArray());
	}
	
	public function toArray(){
		$array=array();
		foreach ($this as $key => $value) {
			if($value!=null){
				$array[$key] = $value;
			}
		}
		return $array;
	}
	/**
	 * @return the $userid
	 */
	public function getUserid() {
		return $this->userid;
	}

	/**
	 * @param field_type $userid
	 */
	public function setUserid($userid) {
		$this->userid = $userid;
	}

	/**
	 * @return the $phone
	 */
	public function getPhone() {
		return $this->phone;
	}

	/**
	 * @param field_type $phone
	 */
	public function setPhone($phone) {
		$this->phone = $phone;
	}

	/**
	 * @return the $age
	 */
	public function getAge() {
		return $this->age;
	}

	/**
	 * @param field_type $age
	 */
	public function setAge($age) {
		$this->age = $age;
	}

	/**
	 * @return the $nation
	 */
	public function getNation() {
		return $this->nation;
	}

	/**
	 * @param field_type $nation
	 */
	public function setNation($nation) {
		$this->nation = $nation;
	}

	/**
	 * @return the $height
	 */
	public function getHeight() {
		return $this->height;
	}

	/**
	 * @param field_type $height
	 */
	public function setHeight($height) {
		$this->height = $height;
	}

	/**
	 * @return the $weight
	 */
	public function getWeight() {
		return $this->weight;
	}

	/**
	 * @param field_type $weight
	 */
	public function setWeight($weight) {
		$this->weight = $weight;
	}

	/**
	 * @return the $sight_before
	 */
	public function getSight_before() {
		return $this->sight_before;
	}

	/**
	 * @param field_type $sight_before
	 */
	public function setSight_before($sight_before) {
		$this->sight_before = $sight_before;
	}

	/**
	 * @return the $sight_after
	 */
	public function getSight_after() {
		return $this->sight_after;
	}

	/**
	 * @param field_type $sight_after
	 */
	public function setSight_after($sight_after) {
		$this->sight_after = $sight_after;
	}

	/**
	 * @return the $household
	 */
	public function getHousehold() {
		return $this->household;
	}

	/**
	 * @param field_type $household
	 */
	public function setHousehold($household) {
		$this->household = $household;
	}

	/**
	 * @return the $location
	 */
	public function getLocation() {
		return $this->location;
	}

	/**
	 * @param field_type $location
	 */
	public function setLocation($location) {
		$this->location = $location;
	}

	/**
	 * @return the $marriage
	 */
	public function getMarriage() {
		return $this->marriage;
	}

	/**
	 * @param field_type $marriage
	 */
	public function setMarriage($marriage) {
		$this->marriage = $marriage;
	}

	/**
	 * @return the $educational
	 */
	public function getEducational() {
		return $this->educational;
	}

	/**
	 * @param field_type $educational
	 */
	public function setEducational($educational) {
		$this->educational = $educational;
	}

	/**
	 * @return the $is_driver
	 */
	public function getIs_driver() {
		return $this->is_driver;
	}

	/**
	 * @param field_type $is_driver
	 */
	public function setIs_driver($is_driver) {
		$this->is_driver = $is_driver;
	}

	/**
	 * @return the $driver_age
	 */
	public function getDriver_age() {
		return $this->driver_age;
	}

	/**
	 * @param field_type $driver_age
	 */
	public function setDriver_age($driver_age) {
		$this->driver_age = $driver_age;
	}

	/**
	 * @return the $lisence
	 */
	public function getLisence() {
		return $this->lisence;
	}

	/**
	 * @param field_type $lisence
	 */
	public function setLisence($lisence) {
		$this->lisence = $lisence;
	}

	/**
	 * @return the $car_type
	 */
	public function getCar_type() {
		return $this->car_type;
	}

	/**
	 * @param field_type $car_type
	 */
	public function setCar_type($car_type) {
		$this->car_type = $car_type;
	}

	/**
	 * @return the $car_number
	 */
	public function getCar_number() {
		return $this->car_number;
	}

	/**
	 * @param field_type $car_number
	 */
	public function setCar_number($car_number) {
		$this->car_number = $car_number;
	}

	/**
	 * @return the $smoke_drive
	 */
	public function getSmoke_drive() {
		return $this->smoke_drive;
	}

	/**
	 * @param field_type $smoke_drive
	 */
	public function setSmoke_drive($smoke_drive) {
		$this->smoke_drive = $smoke_drive;
	}

	/**
	 * @return the $drive_miles
	 */
	public function getDrive_miles() {
		return $this->drive_miles;
	}

	/**
	 * @param field_type $drive_miles
	 */
	public function setDrive_miles($drive_miles) {
		$this->drive_miles = $drive_miles;
	}

	/**
	 * @return the $drive_area
	 */
	public function getDrive_area() {
		return $this->drive_area;
	}

	/**
	 * @param field_type $drive_area
	 */
	public function setDrive_area($drive_area) {
		$this->drive_area = $drive_area;
	}

	/**
	 * @return the $light
	 */
	public function getLight() {
		return $this->light;
	}

	/**
	 * @param field_type $light
	 */
	public function setLight($light) {
		$this->light = $light;
	}

	/**
	 * @return the $normal
	 */
	public function getNormal() {
		return $this->normal;
	}

	/**
	 * @param field_type $normal
	 */
	public function setNormal($normal) {
		$this->normal = $normal;
	}

	/**
	 * @return the $heavy
	 */
	public function getHeavy() {
		return $this->heavy;
	}

	/**
	 * @param field_type $heavy
	 */
	public function setHeavy($heavy) {
		$this->heavy = $heavy;
	}

	/**
	 * @return the $danger
	 */
	public function getDanger() {
		return $this->danger;
	}

	/**
	 * @param field_type $danger
	 */
	public function setDanger($danger) {
		$this->danger = $danger;
	}

	/**
	 * @return the $alcohol
	 */
	public function getAlcohol() {
		return $this->alcohol;
	}

	/**
	 * @param field_type $alcohol
	 */
	public function setAlcohol($alcohol) {
		$this->alcohol = $alcohol;
	}

	/**
	 * @return the $eight
	 */
	public function getEight() {
		return $this->eight;
	}

	/**
	 * @param field_type $eight
	 */
	public function setEight($eight) {
		$this->eight = $eight;
	}

	/**
	 * @return the $four
	 */
	public function getFour() {
		return $this->four;
	}

	/**
	 * @param field_type $four
	 */
	public function setFour($four) {
		$this->four = $four;
	}

	/**
	 * @return the $exhaust
	 */
	public function getExhaust() {
		return $this->exhaust;
	}

	/**
	 * @param field_type $exhaust
	 */
	public function setExhaust($exhaust) {
		$this->exhaust = $exhaust;
	}

	/**
	 * @return the $is_complished
	 */
	public function getIs_complished() {
		return $this->is_complished;
	}

	/**
	 * @param field_type $is_complished
	 */
	public function setIs_complished($is_complished) {
		$this->is_complished = $is_complished;
	}


	

}